package com.chaosyeb.server.controller;


import com.chaosyeb.server.pojo.Menu;
import com.chaosyeb.server.service.IMenuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 菜单列表
 *
 * @author Chaos
 * @since 2021-12-04
 */
@RestController
@RequestMapping("/system/cfg")
public class MenuController {

    @Autowired
    private IMenuService menuService;

    @ApiOperation("根据用户id获取菜单列表")
    @GetMapping("/findMenus")
    public List<Menu> getMenusByAdminId() {
        return menuService.getMenusByAdminId();
    }


}
